import {requestDelete, requestGet, requestPost, requestPut} from "@/api";

export const getUserList = () => {
    return requestGet('/api/sm/users')
}

export const getUserById = (id:string) => {
    return requestGet('/api/sm/user/'+id)
}


export const saveUser = (data?:any) => {
    return requestPost("/api/sm/user",data)
}

export const updateUser = (data?:any) => {
    return requestPut("/api/sm/user",data)
}
export const deleteUser = (id:string) => {
    return requestDelete("/api/sm/user/"+id)
}

export const switchUserEnabled = (id:string) => {
    return requestGet('/api/sm/user/'+id + "/switch")
}

export const resetPassword = (id:string) => {
    return requestGet('/api/sm/user/'+id + "/reset")
}
// export const useOrgApi = (id: Number) => {
// 	return service.get('/sm/org/' + id)
// }
//
// export const deleteApi = (id?:string) => {
// 	return service.get('/sm/org/delete/' + id)
// }
//
// export const useOrgSubmitApi = (dataForm: any) => {
// 	if (dataForm.id) {
// 		return service.post('/sm/org/save', dataForm)
// 	} else {
// 		return service.post('/sm/org/save', dataForm)
// 	}
// }
